package ru.nnstu.client;

import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.lang.reflect.InvocationTargetException;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;

public class Client {

	public Client() {
		super();
		JFrame jfrm = new JFrame("Player Monitor.");
		jfrm.getContentPane().setLayout(new GridBagLayout());
		jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jfrm.setSize(800, 600);
		JLabel lab = new JLabel("Monitor", SwingConstants.LEFT);
		JButton refreshButton = new JButton("Refresh List");
//		refreshButton.setEnabled(true);
		refreshButton.setSize(50, 10);
		refreshButton.setVisible(true);
		refreshButton.setVerticalAlignment(SwingConstants.BOTTOM);
		refreshButton.setHorizontalAlignment(SwingConstants.RIGHT);
		jfrm.getContentPane().setSize(50, 50);//add(refreshButton);		
		jfrm.getContentPane().add(lab);
		jfrm.getContentPane().add(refreshButton);
		
		jfrm.setVisible(true);
	}

	public static void main(String[] args) throws InterruptedException,
			InvocationTargetException {
		SwingUtilities.invokeAndWait(new Runnable() {

			@Override
			public void run() {
				// TODO Auto-generated method stub
				new Client();
			}
		});
	}
}
